package internal

import (
	"fmt"
	"github.com/spf13/cobra"
)

// exampleCmd represents the example command
var exampleCmd = &cobra.Command{
	Use:   "example",
	Short: "示例",
	Long:  `脚本示例`,
	Run: func(cmd *cobra.Command, args []string) {
		param, _ := cmd.Flags().GetString("param")
		fmt.Println("This is example " + param)
		return
	},
}

func init() {
	rootCmd.AddCommand(exampleCmd)
	exampleCmd.Flags().StringP("param", "a", "test", "命令行参数设置")
}
